import { createRouter, createWebHashHistory } from 'vue-router'
import Layout from '@/layouts/Index'

const routes = [
    {
        path: '/',
        component: Layout,
        children: [
            {
                path: '/',
                component: () => import('Views/Index')
            },
            {
                path: '/rank/list',
                component: () => import('Views/Rank/List')
            },
            {
                path: '/plist/index',
                component: () => import('Views/Plist/Index')
            },
            {
                path: '/singer/class',
                component: () => import('Views/Singer/Class')
            }
        ]
    },
    {
        path: '/',
        component: () => import('@/layouts/Default'),
        children: [
            {
                path: '/rank/info/:rankid',
                component: () => import('Views/Rank/Info'),
                props: true
            },
            {
                path: '/plist/list/:specialid',
                component: () => import('Views/Plist/List'),
                props: true
            },
            {
                path: '/singer/list/:classid',
                component: () => import('Views/Singer/List'),
                props: true
            },
            {
                path: '/search/index',
                component: () => import('Views/Search/Index')
            }
        ]
    },
    {
        path: '/singer/info/:singerid',
        component: () => import('Views/Singer/Info'),
        props: true
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
